﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AgileSaude.Business.Process;
using AgileSaude.Entities;
using Uol.PagSeguro.Domain;

namespace AgileSaude.Business
{
    public class PagSeguroFacade
    {
        string _UrlXmlConfiguration;

        public PagSeguroFacade(string pUrlXmlConfiguration)
        {
            _UrlXmlConfiguration=pUrlXmlConfiguration;
        }

        public Uri RequisicaoPagto(PedidoEntities pPedido, ref Resultado resultado)
        {
            return new PagSeguroProcess(_UrlXmlConfiguration).RequisicaoPagto(pPedido, ref resultado);
        }

        public Transaction ConsultaPorTransactionCode(string notificationType, string notificationCode)
        {
            return new PagSeguroProcess(_UrlXmlConfiguration).ConsultaPorTransactionCode(notificationType, notificationCode);
        }

        public TransactionSearchResult ConsultaPorData(DateTime pDtIni, DateTime pDtFim, int pPageNumber)
        {
            return new PagSeguroProcess(_UrlXmlConfiguration).ConsultaPorData(pDtIni, pDtFim, pPageNumber);
        }

        public string getTransactionCode(DateTime pDtIni, DateTime pDtFim, string pReference)
        {
            return new PagSeguroProcess(_UrlXmlConfiguration).getTransactionCode(pDtIni, pDtFim, pReference);
        }
    }
}
